using AppToolKit.Model;
using AppToolKit.Model.Validation;
using System;
using System.Collections;
namespace AppToolKit.Business
{
	[Serializable]
	public class GenericBusinessWrapper<T> : IGenericBusiness where T : class
	{
		private IBusiness<T> business_;
		public GenericBusinessWrapper(IBusiness<T> business)
		{
			this.business_ = business;
		}
		public IList GetAll()
		{
			return (IList)this.business_.GetAll();
		}
		public object Create()
		{
			return this.business_.Create();
		}
		public void Delete(object entity, Opeartion op)
		{
			this.business_.Delete((T)entity, op);
		}
		public object Load(object key)
		{
			return this.business_.Load(key);
		}
		public void Save(object entity, Opeartion op)
		{
			this.business_.Save((T)entity, op);
		}
		public void Update(object entity, Opeartion op)
		{
			this.business_.Update((T)entity, op);
		}
		public ValidateResultSet Valid(object data, ModifiedBehavior behavior)
		{
			throw new NotImplementedException();
		}
		public IList GetList(string query)
		{
			return (IList)this.business_.GetList(query);
		}
		public IList GetListByPage(string query, int start, int max)
		{
			return (IList)this.business_.GetListByPage(query, start, max);
		}
	}
}
